package com.wd.tech.view.activity;

import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.Parcelable;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.wd.tech.R;
import com.wd.tech.bean.AddFriendBean;
import com.wd.tech.mvp.base.BaseActivity;
import com.wd.tech.mvp.base.BasePresenter;
import com.wd.tech.mvp.presenter.PresenterImpl;
import com.wd.tech.mvp.util.MyUrl;

import java.util.HashMap;

import butterknife.BindView;
import butterknife.ButterKnife;

public class AddFriendActivity extends BaseActivity {


    @BindView(R.id.iv_addFriend)
    ImageView ivAddFriend;
    @BindView(R.id.tv_qianming)
    TextView tvQianming;
    @BindView(R.id.tv_sex)
    TextView tvSex;
    @BindView(R.id.tv_shengri)
    TextView tvShengri;
    @BindView(R.id.tv_phone)
    TextView tvPhone;
    @BindView(R.id.tv_email)
    TextView tvEmail;
    @BindView(R.id.tv_jifen)
    TextView tvJifen;
    @BindView(R.id.iv_vip)
    ImageView ivVip;
    @BindView(R.id.bt_addFriend)
    Button btAddFriend;
    private Intent pic;
    private Intent name;

    @Override
    protected void startCoding() {




        //手机号
        String phone = getIntent().getStringExtra("phone");
        this.tvPhone.setText(phone);

        Intent friendUid = getIntent().putExtra("friendUid", "0");
        String remark = getIntent().getStringExtra("remark");

        btAddFriend.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                HashMap<String, Object> map = new HashMap<>();
                map.put("friendUid",friendUid);
                map.put("remark",remark);
                mPresenter.startpostInfoHava(MyUrl.BASE_AddFriend, AddFriendBean.class, map);
                Toast.makeText(AddFriendActivity.this, "已发送", Toast.LENGTH_SHORT).show();

            }
        });


    }

    @Override
    protected BasePresenter initPresenter() {
        return new PresenterImpl();
    }

    @Override
    protected void initView() {

    }

    @Override
    protected int Layout() {
        return R.layout.activity_add_friend;
    }

    @Override
    public void onSuccess(Object o) {
    }

    @Override
    public void onError(String error) {

    }



}
